#include <stdio.h>
#include "Common.h"

COORD CreateCoord(int X, int Y)
{
    COORD coord;
    coord.X = X;
    coord.Y = Y;
    return coord;
}
COORD AddCoord(COORD c1, COORD c2)
{
    COORD coord;
    coord.X = c1.X + c2.X;
    coord.Y = c1.Y + c2.Y;
    return coord;
}

int IsEqual(void* m1, void* m2, int size)
{
    int i;
    for (i = 0; i < size; i++)
        if (*((unsigned char*)m1 + i) != *((unsigned char*)m2 + i))
            return false;
    return true;
}
int fget32(FILE* file)
{
    int val = fgetc(file);
    val |= fgetc(file) << 8;
    val |= fgetc(file) << 16;
    val |= fgetc(file) << 24;
    return val;
}